package com.tanquandan.askbackend.controller;

import com.tanquandan.askbackend.dto.R;
import com.tanquandan.askbackend.entity.Employee;
import com.tanquandan.askbackend.service.IEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/employee")
public class EmployeeController {
    @Autowired
    private IEmployeeService employeeService;

    @PostMapping("/login")
    public R<Employee> login(HttpServletRequest request, @RequestBody Employee employee){
        return employeeService.login(request,employee);
    }

    @GetMapping("/test")
    public void test(){
        System.out.println("test");
    }
}
